package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DishMaterialMapper;
import com.ruoyi.system.domain.DishMaterial;
import com.ruoyi.system.service.IDishMaterialService;

/**
 * 菜品原料Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-22
 */
@Service
public class DishMaterialServiceImpl implements IDishMaterialService 
{
    @Autowired
    private DishMaterialMapper dishMaterialMapper;

    /**
     * 查询菜品原料
     * 
     * @param id 菜品原料主键
     * @return 菜品原料
     */
    @Override
    public DishMaterial selectDishMaterialById(String id)
    {
        return dishMaterialMapper.selectDishMaterialById(id);
    }

    /**
     * 查询菜品原料列表
     * 
     * @param dishMaterial 菜品原料
     * @return 菜品原料
     */
    @Override
    public List<DishMaterial> selectDishMaterialList(DishMaterial dishMaterial)
    {
        return null;
    }

    /**
     * 新增菜品原料
     * 
     * @param dishMaterial 菜品原料
     * @return 结果
     */
    @Override
    public int insertDishMaterial(DishMaterial dishMaterial)
    {
        return dishMaterialMapper.insertDishMaterial(dishMaterial);
    }

    /**
     * 修改菜品原料
     * 
     * @param dishMaterial 菜品原料
     * @return 结果
     */
    @Override
    public int updateDishMaterial(DishMaterial dishMaterial)
    {
        return dishMaterialMapper.updateDishMaterial(dishMaterial);
    }

    /**
     * 批量删除菜品原料
     * 
     * @param ids 需要删除的菜品原料主键
     * @return 结果
     */
    @Override
    public int deleteDishMaterialByIds(String[] ids)
    {
        return dishMaterialMapper.deleteDishMaterialByIds(ids);
    }

    /**
     * 删除菜品原料信息
     * 
     * @param id 菜品原料主键
     * @return 结果
     */
    @Override
    public int deleteDishMaterialById(String id)
    {
        return dishMaterialMapper.deleteDishMaterialById(id);
    }
}
